package com.fenghongzhang.day005;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


/**
 * A simple {@link Fragment} subclass.
 */
public class ContentFragment extends Fragment {
    private TextView fgTv;

    public ContentFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_content, container, false);
        fgTv = (TextView) inflate.findViewById(R.id.fg_tv);

//        fgTv.setText(?);

        Bundle bundle = getArguments();
        if(bundle != null){
            String name = bundle.getString("name");
            fgTv.setText(name);
        }
//

        return inflate;
    }
}
